//
//  CRSessionCellLayoutProtocol.h
//  TestPrj
//
//  Created by 朱铅峰 on 2020/8/13.
//  Copyright © 2020 Xing. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "CRMessageModel.h"

@protocol CRSessionCellLayoutProtocol <NSObject>

/**
 * @return 返回message的内容大小
 */
- (CGSize)contentSize:(CRMessageModel *)model cellWidth:(CGFloat)width;

/**
 *  需要构造的cellContent类名
 */
- (NSString *)cellContent:(CRMessageModel *)model;

/**
 *  左对齐的气泡，cell气泡距离整个cell的内间距
 */
- (UIEdgeInsets)cellInsets:(CRMessageModel *)model;

/**
 *  左对齐的气泡，cell内容距离气泡的内间距，
 */
- (UIEdgeInsets)contentViewInsets:(CRMessageModel *)model;

/**
 * @return 返回message的所回复消息内容大小
 */
- (CGSize)replyContentSize:(CRMessageModel *)model cellWidth:(CGFloat)width;

/**
 *  需要构造的ReplyContent类名
 */
- (NSString *)replyContent:(CRMessageModel *)model;

/**
 *  左对齐的气泡，cell reply气泡距离整个cell的内间距
 */
- (UIEdgeInsets)replyCellInsets:(CRMessageModel *)model;

/**
 *  左对齐的气泡，cell reply内容距离气泡的内间距，
 */
- (UIEdgeInsets)replyContentViewInsets:(CRMessageModel *)model;

/**
 *  是否显示头像
 */
- (BOOL)shouldShowAvatar:(CRMessageModel *)model;


/**
 *  左对齐的气泡，头像控件的 origin 点
 */
- (CGPoint)avatarMargin:(CRMessageModel *)model;

/**
 *  左对齐的气泡，头像控件的 size
 */
- (CGSize)avatarSize:(CRMessageModel *)model;

/**
 *  是否显示姓名
 */
- (BOOL)shouldShowNickName:(CRMessageModel *)model;

/**
 *  左对齐的气泡，昵称控件的 origin 点
 */
- (CGPoint)nickNameMargin:(CRMessageModel *)model;


/**
 *  消息显示在左边
 */
- (BOOL)shouldShowLeft:(CRMessageModel *)model;


/**
 *  需要添加到Cell上的自定义视图
 */
- (NSArray *)customViews:(CRMessageModel *)model;


/**
 *  是否开启重试叹号开关
 */
- (BOOL)disableRetryButton:(CRMessageModel *)model;

/**
 * 是否显示气泡背景图
 */
- (BOOL)shouldDisplayBubbleBackground:(CRMessageModel *)model;

@end
